/*
 * SessionBean1.java
 *
 * Created on 14/06/2008, 10:45:16 AM
 */
 
package runt.rnc;

import runt.*;
import com.sun.rave.web.ui.appbase.AbstractSessionBean;
import com.sun.webui.jsf.model.Option;
import java.util.Date;
import javax.faces.FacesException;

/**
 * <p>Session scope data bean for your application.  Create properties
 *  here to represent cached data that should be made available across
 *  multiple HTTP requests for an individual user.</p>
 *
 * <p>An instance of this class will be created for you automatically,
 * the first time your application evaluates a value binding expression
 * or method binding expression that references a managed bean using
 * this class.</p>
 *
 * @author Hrey
 */
public class RegistroNacionalConductoresSession extends AbstractSessionBean {
    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">

    /**
     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
     * This method is automatically generated, so any user-specified code inserted
     * here is subject to being replaced.</p>
     */
    private void _init() throws Exception {
    }
    // </editor-fold>
    protected Option[] tiposDocumentos;
    protected String tTiposDocumentos;
    private String nombre;
    private double identificacion;
    private Date fechaNacimiento;
    private String telefono;
    private Option[] generos;
    private String tGeneros;
    private String direccion;
    private Option[] deptos;

    public String getTCategoriasLicencia() {
        return tCategoriasLicencia;
    }

    public void setTCategoriasLicencia(String tCategoriasLicencia) {
        this.tCategoriasLicencia = tCategoriasLicencia;
    }

    public String getTCentrosEnseñanza() {
        return tCentrosEnseñanza;
    }

    public void setTCentrosEnseñanza(String tCentrosEnseñanza) {
        this.tCentrosEnseñanza = tCentrosEnseñanza;
    }

    public String getTCiudades() {
        return tCiudades;
    }

    public void setTCiudades(String tCiudades) {
        this.tCiudades = tCiudades;
    }

    public String getTDeptos() {
        return tDeptos;
    }

    public void setTDeptos(String tDeptos) {
        this.tDeptos = tDeptos;
    }

    public String getTGeneros() {
        return tGeneros;
    }

    public void setTGeneros(String tGeneros) {
        this.tGeneros = tGeneros;
    }

    public String getTRestricciones() {
        return tRestricciones;
    }

    public void setTRestricciones(String tRestricciones) {
        this.tRestricciones = tRestricciones;
    }

    public String getTRh() {
        return tRh;
    }

    public void setTRh(String tRh) {
        this.tRh = tRh;
    }

    public String getTTipoSangre() {
        return tTipoSangre;
    }

    public void setTTipoSangre(String tTipoSangre) {
        this.tTipoSangre = tTipoSangre;
    }

    public String getTTiposDocumentos() {
        return tTiposDocumentos;
    }

    public void setTTiposDocumentos(String tTiposDocumentos) {
        this.tTiposDocumentos = tTiposDocumentos;
    }
    private String tDeptos;;
    private Option[] ciudades;
    private String tCiudades;
    private Option[] rh;
    private String tRh;
    private Option[] tipoSangre;
    private String tTipoSangre;
    private String foto;
    private Option[] restricciones;
    private String tRestricciones;
    private double numeroLicencia;
    private Date fechaExpediccion;
    private Date vigencia;
    private Option[] centrosEnseñanza;
    private String tCentrosEnseñanza;
    private Option[] categoriasLicencia;
    private String tCategoriasLicencia;
    private String numeroLicenciaExt;
    private String numeroCedulaExt;
    private String nombreExt;
    private Date fechaExpedicionExt;

    /**
     * Get the value of tiposDocumentos
     *
     * @return the value of tiposDocumentos
     */
    public Option[] getTiposDocumentos() {
        return tiposDocumentos;
    }

    /**
     * Set the value of tiposDocumentos
     *
     * @param tiposDocumentos new value of tiposDocumentos
     */
    public void setTiposDocumentos(Option[] tiposDocumentos) {
        this.tiposDocumentos = tiposDocumentos;
    }

    public Option[] getCategoriasLicencia() {
        return categoriasLicencia;
    }

    public void setCategoriasLicencia(Option[] categoriasLicencia) {
        this.categoriasLicencia = categoriasLicencia;
    }

    public Option[] getCentrosEnseñanza() {
        return centrosEnseñanza;
    }

    public void setCentrosEnseñanza(Option[] centrosEnseñanza) {
        this.centrosEnseñanza = centrosEnseñanza;
    }

    public Option[] getCiudades() {
        return ciudades;
    }

    public void setCiudades(Option[] ciudades) {
        this.ciudades = ciudades;
    }

    public Option[] getDeptos() {
        return deptos;
    }

    public void setDeptos(Option[] deptos) {
        this.deptos = deptos;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public Date getFechaExpediccion() {
        return fechaExpediccion;
    }

    public void setFechaExpediccion(Date fechaExpediccion) {
        this.fechaExpediccion = fechaExpediccion;
    }

    public Date getFechaExpedicionExt() {
        return fechaExpedicionExt;
    }

    public void setFechaExpedicionExt(Date fechaExpedicionExt) {
        this.fechaExpedicionExt = fechaExpedicionExt;
    }

    public Date getFechaNacimiento() {
        return fechaNacimiento;
    }

    public void setFechaNacimiento(Date fechaNacimiento) {
        this.fechaNacimiento = fechaNacimiento;
    }

    public String getFoto() {
        return foto;
    }

    public void setFoto(String foto) {
        this.foto = foto;
    }

    public Option[] getGeneros() {
        return generos;
    }

    public void setGeneros(Option[] generos) {
        this.generos = generos;
    }

    public double getIdentificacion() {
        return identificacion;
    }

    public void setIdentificacion(double identificacion) {
        this.identificacion = identificacion;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getNombreExt() {
        return nombreExt;
    }

    public void setNombreExt(String nombreExt) {
        this.nombreExt = nombreExt;
    }

    public String getNumeroCedulaExt() {
        return numeroCedulaExt;
    }

    public void setNumeroCedulaExt(String numeroCedulaExt) {
        this.numeroCedulaExt = numeroCedulaExt;
    }

    public double getNumeroLicencia() {
        return numeroLicencia;
    }

    public void setNumeroLicencia(double numeroLicencia) {
        this.numeroLicencia = numeroLicencia;
    }

    public String getNumeroLicenciaExt() {
        return numeroLicenciaExt;
    }

    public void setNumeroLicenciaExt(String numeroLicenciaExt) {
        this.numeroLicenciaExt = numeroLicenciaExt;
    }

    public Option[] getRestricciones() {
        return restricciones;
    }

    public void setRestricciones(Option[] restricciones) {
        this.restricciones = restricciones;
    }

    public Option[] getRh() {
        return rh;
    }

    public void setRh(Option[] rh) {
        this.rh = rh;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public Option[] getTipoSangre() {
        return tipoSangre;
    }

    public void setTipoSangre(Option[] tipoSangre) {
        this.tipoSangre = tipoSangre;
    }

    public Date getVigencia() {
        return vigencia;
    }

    public void setVigencia(Date vigencia) {
        this.vigencia = vigencia;
    }

    
    /**
     * <p>Construct a new session data bean instance.</p>
     */
    public RegistroNacionalConductoresSession() {
    }

    /**
     * <p>This method is called when this bean is initially added to
     * session scope.  Typically, this occurs as a result of evaluating
     * a value binding or method binding expression, which utilizes the
     * managed bean facility to instantiate this bean and store it into
     * session scope.</p>
     * 
     * <p>You may customize this method to initialize and cache data values
     * or resources that are required for the lifetime of a particular
     * user session.</p>
     */
    @Override
    public void init() {
        // Perform initializations inherited from our superclass
        super.init();
        // Perform application initialization that must complete
        // *before* managed components are initialized
        // TODO - add your own initialiation code here
        
        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
        // Initialize automatically managed components
        // *Note* - this logic should NOT be modified
        try {
            _init();
        } catch (Exception e) {
            log("SessionBean1 Initialization Failure", e);
            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        }
        
        // </editor-fold>
        // Perform application initialization that must complete
        // *after* managed components are initialized
        tiposDocumentos = new Option[2];
        tiposDocumentos[0] = new Option("CC","Cedula");
        tiposDocumentos[1] = new Option("TI","Tarjeta Identidad");
        generos = new Option[2];
        generos[0] = new Option("1","Masculino");
        generos[1] = new Option("2","Femenino");
        deptos = new Option[2];
        deptos[0] = new Option("1","Depto 1");
        deptos[1] = new Option("2","Depto 2");
        ciudades = new Option[2];
        ciudades[0] = new Option("1","Ciudad 1");
        ciudades[1] = new Option("2","Ciudad 2");
        rh = new Option[4];
        rh[0] = new Option("1","A");
        rh[1] = new Option("2","B");
        rh[2] = new Option("3","AB");
        rh[3] = new Option("4","O");
        tipoSangre = new Option[2];
        tipoSangre[0] = new Option("1","+");
        tipoSangre[1] = new Option("2","-");
        restricciones = new Option[3];
        restricciones[0] = new Option("1","Ninguna");
        restricciones[1] = new Option("2","Gafas");
        restricciones[2] = new Option("3","Otra");
        centrosEnseñanza = new Option[2];
        centrosEnseñanza[0] = new Option("1","Centro 1");
        centrosEnseñanza[1] = new Option("2","Centro 2");
        categoriasLicencia = new Option[2];
        categoriasLicencia[0] = new Option("1","Categoria 1");
        categoriasLicencia[1] = new Option("2","Categoria 2");
    }

    /**
     * <p>This method is called when the session containing it is about to be
     * passivated.  Typically, this occurs in a distributed servlet container
     * when the session is about to be transferred to a different
     * container instance, after which the <code>activate()</code> method
     * will be called to indicate that the transfer is complete.</p>
     * 
     * <p>You may customize this method to release references to session data
     * or resources that can not be serialized with the session itself.</p>
     */
    @Override
    public void passivate() {
    }

    /**
     * <p>This method is called when the session containing it was
     * reactivated.</p>
     * 
     * <p>You may customize this method to reacquire references to session
     * data or resources that could not be serialized with the
     * session itself.</p>
     */
    @Override
    public void activate() {
    }

    /**
     * <p>This method is called when this bean is removed from
     * session scope.  Typically, this occurs as a result of
     * the session timing out or being terminated by the application.</p>
     * 
     * <p>You may customize this method to clean up resources allocated
     * during the execution of the <code>init()</code> method, or
     * at any later time during the lifetime of the application.</p>
     */
    @Override
    public void destroy() {
    }
    
    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected BaseApplicationBean getBaseApplicationBean() {
        return (BaseApplicationBean) getBean("BaseApplicationBean");
    }

}
